home *** CD-ROM | disk | FTP | other *** search
- global gWorld, gStates, gObjects, gCurKeyList, void, gCursorlist, sQTCharSprite, gHaveNavs, gTempHotRects, gHotRects
-
- on doResolutionC08Down
- increment(#thermDisplay, #down, 1)
- set thisState to the result
- increment(#vial, #down, 1)
- CursorandUpdate()
- score(#ThermometerOBJ, thisState)
- end
-
- on doResolutionC08Up
- increment(#thermDisplay, #UP, 1)
- set thisState to the result
- increment(#vial, #UP, 1)
- CursorandUpdate()
- score(#ThermometerOBJ, thisState)
- end
-
- on DowindSpeedLeft
- increment(#windSpeedDisplay, #down)
- set thisState to the result
- set the State of the windSpeedgraph of gObjects to getAt(the animList of getaProp(gObjects, #windSpeedgraph), thisState)
- displayObj(getAt(the animList of getaProp(gObjects, #windSpeedgraph), thisState))
- CursorandUpdate()
- score(#windspeedObj, thisState)
- end
-
- on DowindSpeedRight
- increment(#windSpeedDisplay, #UP)
- set thisState to the result
- set the State of the windSpeedgraph of gObjects to getAt(the animList of getaProp(gObjects, #windSpeedgraph), thisState)
- displayObj(getAt(the animList of getaProp(gObjects, #windSpeedgraph), thisState))
- CursorandUpdate()
- score(#windspeedObj, thisState)
- end
-
- on DoEastWestLeft
- incrementParent(#eastWestDisplay, #down, 1)
- set thisState to the result
- set the State of the eastWestMonitor of gObjects to getAt(the animList of getaProp(gObjects, #eastWestMonitor), thisState)
- displayObj(getAt(the animList of getaProp(gObjects, #eastWestMonitor), thisState))
- CursorandUpdate()
- score(#EastWestTempObj, thisState)
- end
-
- on DoeastWestRight
- incrementParent(#eastWestDisplay, #UP, 1)
- set thisState to the result
- set the State of the eastWestMonitor of gObjects to getAt(the animList of getaProp(gObjects, #eastWestMonitor), thisState)
- displayObj(getAt(the animList of getaProp(gObjects, #eastWestMonitor), thisState))
- CursorandUpdate()
- score(#EastWestTempObj, thisState)
- end
-
- on score OBJref, ObjState
- set puzzleAnswers to [#ThermometerOBJ: 7, #windspeedObj: 3, #EastWestTempObj: 2, #weatherObj: #icy]
- if OBJref = #weatherObj then
- if getaProp(getaProp(gStates, #BeenThere), #d01) then
- setaProp(puzzleAnswers, #weatherObj, #hot)
- end if
- setaProp(getaProp(gStates, #Conditions), #Weather, ObjState)
- end if
- if ObjState = getaProp(puzzleAnswers, OBJref) then
- set SolvedValue to 1
- else
- set SolvedValue to 0
- end if
- MakeDynamic(OBJref, #solved, SolvedValue)
- return SolvedValue
- end
-
- on incrementParent OBJref, direction, dontUpdate
- set OBj to getaProp(gObjects, OBJref)
- set myParentRef to getaProp(OBj, #Parent)
- set myParent to getaProp(gObjects, myParentRef)
- set howmany to count(the allStates of myParent)
- set thisState to getOne(the allStates of myParent, the currentState of myParent)
- if direction = #UP then
- if thisState <> howmany then
- set thisState to thisState + 1
- else
- set thisState to 1
- end if
- else
- if direction = #down then
- if thisState <> 1 then
- set thisState to thisState - 1
- else
- set thisState to howmany
- end if
- end if
- end if
- if getaProp(OBj, #type) = #animatorParent then
- displayObj(getAt(the animList of OBj, thisState))
- MakeDynamic(OBJref, #currentState, getAt(getaProp(OBj, #animList), thisState))
- else
- set the castNum of sprite the SpriteNum of OBj to getAt(getAt(getaProp(OBj, #cast), thisState), 1)
- if voidp(dontUpdate) then
- CursorandUpdate()
- end if
- MakeDynamic(myParentRef, #currentState, getAt(getaProp(myParent, #allStates), thisState))
- MakeDynamic(OBJref, #DisplayState, getaProp(myParent, #currentState))
- MakeDynamic(OBJref, #State, getAt(getaProp(OBj, #allStates), thisState))
- end if
- return thisState
- end
-
- on increment OBJref, direction, dontUpdate
- set OBj to getaProp(gObjects, OBJref)
- set howmany to count(the allStates of OBj)
- set thisState to getOne(the allStates of OBj, the State of OBj)
- if direction = #UP then
- if thisState <> howmany then
- set thisState to thisState + 1
- else
- set thisState to 1
- end if
- else
- if direction = #down then
- if thisState <> 1 then
- set thisState to thisState - 1
- else
- set thisState to howmany
- end if
- end if
- end if
- set the castNum of sprite the SpriteNum of OBj to getAt(getAt(getaProp(OBj, #cast), thisState), 1)
- if voidp(dontUpdate) then
- CursorandUpdate()
- end if
- MakeDynamic(OBJref, #State, getAt(getaProp(OBj, #allStates), thisState))
- MakeDynamic(OBJref, #DisplayState, getaProp(OBj, #State))
- return thisState
- end
-
- on DoReset
- switchOFFC11()
- end
-
- on DowindSpeedEnable
- switchOnC11(#WindSpeedGraphObj)
- end
-
- on DoTempRocketEnable
- switchOnC11(#Rocketc08GraphObj)
- end
-
- on DoEastWestBalloonEnable
- switchOnC11(#EastWestBalloonGrafObj)
- end
-
- on switchOFFC11
- ChangeSpecialState(#weatherObj, #off)
- MakeDynamic(#C11AccessControlPanel, #State, #menu)
- MakeDynamic(#C11AccessControlPanel, #DisplayState, #menu)
- MakeDynamic(#WindSpeedGraphObj, #loc, getaProp(getaProp(gObjects, #WindSpeedGraphObj), #offloc))
- MakeDynamic(#EastWestBalloonGrafObj, #loc, getaProp(getaProp(gObjects, #EastWestBalloonGrafObj), #offloc))
- MakeDynamic(#Rocketc08GraphObj, #loc, getaProp(getaProp(gObjects, #Rocketc08GraphObj), #offloc))
- MakeDynamic(#barGraphBkgnd, #DisplayState, #false)
- cleanUpmySeasonsAnim()
- MakeDynamic(#AttrAnim, #paused, 0)
- end
-
- on switchOnC11 whichChild
- set ParentObjRef to #weatherObj
- set ParentOBJ to getaProp(gObjects, ParentObjRef)
- set OBj to getaProp(gObjects, whichChild)
- set myCousin to getaProp(OBj, #cousin)
- if (getaProp(getaProp(gObjects, myCousin), #State) <> #off) and (calcC11AttrState() <> #Attr) then
- DelObjects(getaProp(getaProp(ParentOBJ, #SpecialChild), getaProp(ParentOBJ, #State)))
- MakeDynamic(whichChild, #loc, the onloc of OBj)
- MakeDynamic(#barGraphBkgnd, #DisplayState, the State of the barGraphBkgnd of gObjects)
- AddObjects(getaProp(getaProp(ParentOBJ, #SpecialChild), calcC11grafState()))
- erasegraphs()
- return getaProp(getaProp(gObjects, #weatherObj), #Condition)
- end if
- end
-
- on CancelAccessC11ControlPanel
- switchOFFC11()
- end
-
- on AccessC11ControlPanel
- set theCurrentState to calcC11AttrState()
- if theCurrentState = #Attr then
- setaProp(getaProp(gStates, #Conditions), #weatherControl, 1)
- doAttrTransition()
- else
- set ParentObjRef to #weatherObj
- set ParentOBJ to getaProp(gObjects, ParentObjRef)
- DelObjects(getaProp(getaProp(ParentOBJ, #SpecialChild), getaProp(ParentOBJ, #State)))
- if not voidp(getaProp(getaProp(gStates, #BeenThere), #d04)) then
- MakeDynamic(#C11AccessControlPanel, #State, #error2)
- MakeDynamic(#C11AccessControlPanel, #DisplayState, #error2)
- else
- MakeDynamic(#C11AccessControlPanel, #State, #error1)
- MakeDynamic(#C11AccessControlPanel, #DisplayState, #error1)
- if getaProp(getaProp(gObjects, #C11AccessControlPanel), #metError1) = 1 then
- PDARelease("J04m08p.mov")
- else
- PDARelease("J04m06p.mov")
- MakeDynamic(#C11AccessControlPanel, #metError1, 1)
- end if
- end if
- AddObjects(getaProp(getaProp(ParentOBJ, #SpecialChild), theCurrentState))
- MakeDynamic(#c02worker, #metCondition6, 1)
- end if
- return getaProp(getaProp(gObjects, #weatherObj), #Condition)
- end
-
- on doAttrTransition
- set Mobj to getaProp(gObjects, #weatherObj)
- set gHaveNavs to #false
- cursor(getaProp(gCursorlist, #NullCursor))
- set gHotRects to [:]
- addUnvObjects()
- removeAccessState()
- if the transitionsPlayed of the weatherObj of gObjects = 0 then
- MakeDynamic(#weatherObj, #transitionsPlayed, 1)
- AddObjects([#flashQT])
- Startthetimer(60, string("waitForMyQT #flashQT, #transAttrQT"))
- else
- Startthetimer(1, "loadAttrState", #weatherObj)
- end if
- end
-
- on waitForMyQT OBJref, NextObjRef, loadNow
- repeat while the movieRate of sprite sQTCharSprite
- updateStage()
- end repeat
- set the loc of sprite getaProp(getaProp(gObjects, OBJref), #SpriteNum) to point(20000, 20000)
- DelObjects([OBJref])
- if not voidp(NextObjRef) then
- Startthetimer(1, string("addObjects [#transAttrQT]"))
- Startthetimer(60, "waitForMyQT #transAttrQT, void, 1")
- end if
- if not voidp(loadNow) then
- loadAttrState()
- end if
- end
-
- on moveflashQT
- set the loc of sprite getaProp(getaProp(gObjects, #flashQT), #SpriteNum) to point(20000, 20000)
- end
-
- on removeAccessState
- set ParentObjRef to #weatherObj
- set ParentOBJ to getaProp(gObjects, ParentObjRef)
- set OBj to getaProp(gObjects, #C11AccessControlPanel)
- DelObjects(getaProp(getaProp(ParentOBJ, #SpecialChild), #Access))
- MakeDynamic(#weatherObj, #State, #Attr)
- set the loc of the barGraphBkgnd of gObjects to the onloc of the barGraphBkgnd of gObjects
- end
-
- on loadAttrState
- set gHaveNavs to #true
- AddObjects([#weatherObj])
- PDARelease("J04m09p.mov")
- end
-